package org.ezplatform.office.questionnaire.entity;
 
import org.ezplatform.core.annotation.MetaData;
import org.ezplatform.core.entity.BaseNativeEntity;

import javax.persistence.*;
import java.math.BigInteger;
import java.util.List;
import java.util.Map;

/** 
* @author 作者: wujs
* @version 创建时间：2017年11月22日 上午11:18:14 
* 类说明: 问卷题目
*/
@MetaData(value = "问卷题目")
@Entity(name = "QuestionnaireTopic")
@Table(name = "oa_questionnaire_topic", uniqueConstraints = { @UniqueConstraint(columnNames = "id") })
public class QuestionnaireTopic extends BaseNativeEntity{

	private static final long serialVersionUID = 4477793823544946239L;
	
	@MetaData(value = "问卷ID")
  	@Column(name = "questionnaire_id", nullable = false, length = 32)
    private String questionnaireId;
	
	@MetaData(value = "标题名称")
  	@Column(name = "topic_name", length = 100)
    private String topicName;
	
	@MetaData(value = "标题名称不含标题")
  	@Column(name = "topic_name_txt", length = 100)
    private String topicNameTxt;

	@MetaData(value = "标题序号")
  	@Column(name = "topic_no")
    private String topicNo;
	
	@MetaData(value = "题型")
  	@Column(name = "topic_type", length = 100)
    private String topicType;

	/**
	 * 题型枚举 (部分)
	 */
	public enum TopicTypeEnum{
		/**
		 * 问答题
		 */
		ANSWER("answer","问答题"),
		/**
		 * 填空题
		 */
		FILLINBLANKS("fillInBlanks","填空题"),
		/**
		 * 附件题型
		 */
		FIELD("field","附件题型"),
		/**
		 * 量表
		 */
		SCALE("scale","量表"),
		/**
		 * 矩阵量表
		 */
		MULSCALE("mulscale","矩阵量表");
		private String code;
		private String value;
		TopicTypeEnum(String code,String value){
			this.code = code;
			this.value = value;
		}
		public String getCode() {
			return code;
		}
		public String getValue() {
			return value;
		}
	}
	
	@MetaData(value = "标题设置")
  	@Column(name = "topic_setting", length = 500)
    private String topicSetting;
	
	@MetaData(value = "排序")
  	@Column(name = "order_no")
    private int orderNo;
	
	@MetaData(value = "题目是否计分")
  	@Column(name = "is_score", length = 2)
    private String isScore;

	@MetaData(value = "每题的编号")
  	@Column(name = "times", length = 255)
    private String times;
	
	/**
	 * 矩阵量表 星星选择了第几个
	 */
	@Transient
	private List<Integer> starNum;

	@Transient
	private String page;
	
	@Transient
	private Map<String,Object> settingMap;
	@Transient
	private List<QuestionnaireTopicOptions> list;
	@Transient
	private String ruleTopicName;
	@Transient
	private String averageScore;
	@Transient
	private String realAverageScore;
	@Transient
	private List<String> illustrateList;
	@Transient
	private List<String> illustrateTxtList;
	//是否是分页，说明下的第一题
	@Transient
	private String numberOne;
	//题型时下拉时判断是有作答
	@Transient
	private String isCheck;
	
	/**
	*  填空，附件，问答答题数量
	*/
	@Transient
	private int num;
	
	//正确率
	@Transient
	private String accuracy;
	
	//题目分数
	@Transient
	private String topicScore;
	
	public String getQuestionnaireId() {
		return questionnaireId;
	}

	public void setQuestionnaireId(String questionnaireId) {
		this.questionnaireId = questionnaireId;
	}

	public String getTopicName() {
		return topicName;
	}

	public void setTopicName(String topicName) {
		this.topicName = topicName;
	}

	public String getTopicNameTxt() {
		return topicNameTxt;
	}

	public void setTopicNameTxt(String topicNameTxt) {
		this.topicNameTxt = topicNameTxt;
	}
	
	public String getTopicType() {
		return topicType;
	}

	public void setTopicType(String topicType) {
		this.topicType = topicType;
	}

	public String getTopicSetting() {
		return topicSetting;
	}

	public void setTopicSetting(String topicSetting) {
		this.topicSetting = topicSetting;
	}

	public int getOrderNo() {
		return orderNo;
	}

	public void setOrderNo(int orderNo) {
		this.orderNo = orderNo;
	}

	public String getTopicNo() {
		return topicNo;
	}

	public void setTopicNo(String topicNo) {
		this.topicNo = topicNo;
	}

	public Map<String, Object> getSettingMap() {
		return settingMap;
	}

	public void setSettingMap(Map<String, Object> settingMap) {
		this.settingMap = settingMap;
	}

	public List<QuestionnaireTopicOptions> getList() {
		return list;
	}

	public void setList(List<QuestionnaireTopicOptions> list) {
		this.list = list;
	}

	public String getRuleTopicName() {
		return ruleTopicName;
	}

	public void setRuleTopicName(String ruleTopicName) {
		this.ruleTopicName = ruleTopicName;
	}

	public String getAverageScore() {
		return averageScore;
	}

	public void setAverageScore(String averageScore) {
		this.averageScore = averageScore;
	}

	public String getIsScore() {
		return isScore;
	}

	public void setIsScore(String isScore) {
		this.isScore = isScore;
	}

	public String getRealAverageScore() {
		return realAverageScore;
	}

	public void setRealAverageScore(String realAverageScore) {
		this.realAverageScore = realAverageScore;
	}

	public String getIsCheck() {
		return isCheck;
	}

	public void setIsCheck(String isCheck) {
		this.isCheck = isCheck;
	}
	
	public List<String> getIllustrateList() {
		return illustrateList;
	}

	public void setIllustrateList(List<String> illustrateList) {
		this.illustrateList = illustrateList;
	}

	public List<String> getIllustrateTxtList() {
		return illustrateTxtList;
	}

	public void setIllustrateTxtList(List<String> illustrateTxtList) {
		this.illustrateTxtList = illustrateTxtList;
	}

	public String getNumberOne() {
		return numberOne;
	}

	public void setNumberOne(String numberOne) {
		this.numberOne = numberOne;
	}

	public int getNum() {
		return num;
	}

	public void setNum(int num) {
		this.num = num;
	}

	public List<Integer> getStarNum() {
		return starNum;
	}

	public void setStarNum(List<Integer> starNum) {
		this.starNum = starNum;
	}

	public String getPage() {
		return page;
	}

	public void setPage(String page) {
		this.page = page;
	}

	public String getTimes() {
		return times;
	}

	public void setTimes(String times) {
		this.times = times;
	}

	public String getAccuracy() {
		return accuracy;
	}

	public void setAccuracy(String accuracy) {
		this.accuracy = accuracy;
	}

	public String getTopicScore() {
		return topicScore;
	}

	public void setTopicScore(String topicScore) {
		this.topicScore = topicScore;
	}
	
	
}
